Integrand size = 23, antiderivative size = 149 \[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=-\frac {E\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right )|\frac {2 b}{a+b}\right ) \sqrt {a+b \sin (c+d x)}}{d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}+\frac {a \operatorname {EllipticF}\left (\frac {1}{2} \left (c-\frac {\pi }{2}+d x\right ),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}{d \sqrt {a+b \sin (c+d x)}}+\frac {\sqrt {a+b \sin (c+d x)} \tan (c+d x)}{d} \]
(sin(1/2*c+1/4*Pi+1/2*d*x)^2)^(1/2)/sin(1/2*c+1/4*Pi+1/2*d*x)*EllipticE(co s(1/2*c+1/4*Pi+1/2*d*x),2^(1/2)*(b/(a+b))^(1/2))*(a+b*sin(d*x+c))^(1/2)/d/ ((a+b*sin(d*x+c))/(a+b))^(1/2)-a*(sin(1/2*c+1/4*Pi+1/2*d*x)^2)^(1/2)/sin(1 /2*c+1/4*Pi+1/2*d*x)*EllipticF(cos(1/2*c+1/4*Pi+1/2*d*x),2^(1/2)*(b/(a+b)) ^(1/2))*((a+b*sin(d*x+c))/(a+b))^(1/2)/d/(a+b*sin(d*x+c))^(1/2)+(a+b*sin(d *x+c))^(1/2)*tan(d*x+c)/d
Time = 2.74 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.85 \[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {(a+b) E\left (\frac {1}{4} (-2 c+\pi -2 d x)|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}-a \operatorname {EllipticF}\left (\frac {1}{4} (-2 c+\pi -2 d x),\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sin (c+d x)}{a+b}}+(a+b \sin (c+d x)) \tan (c+d x)}{d \sqrt {a+b \sin (c+d x)}} \]
((a + b)*EllipticE[(-2*c + Pi - 2*d*x)/4, (2*b)/(a + b)]*Sqrt[(a + b*Sin[c + d*x])/(a + b)] - a*EllipticF[(-2*c + Pi - 2*d*x)/4, (2*b)/(a + b)]*Sqrt [(a + b*Sin[c + d*x])/(a + b)] + (a + b*Sin[c + d*x])*Tan[c + d*x])/(d*Sqr t[a + b*Sin[c + d*x]])
Time = 0.74 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.09, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.522, Rules used = {3042, 3169, 27, 3042, 3231, 3042, 3134, 3042, 3132, 3142, 3042, 3140}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a+b \sin (c+d x)}}{\cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3169 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\int \frac {b \sin (c+d x)}{2 \sqrt {a+b \sin (c+d x)}}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \int \frac {\sin (c+d x)}{\sqrt {a+b \sin (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \int \frac {\sin (c+d x)}{\sqrt {a+b \sin (c+d x)}}dx\) |
\(\Big \downarrow \) 3231 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {\int \sqrt {a+b \sin (c+d x)}dx}{b}-\frac {a \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {\int \sqrt {a+b \sin (c+d x)}dx}{b}-\frac {a \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )\) |
\(\Big \downarrow \) 3134 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {\sqrt {a+b \sin (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}dx}{b \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {a \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {\sqrt {a+b \sin (c+d x)} \int \sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}dx}{b \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {a \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )\) |
\(\Big \downarrow \) 3132 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {2 \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {a \int \frac {1}{\sqrt {a+b \sin (c+d x)}}dx}{b}\right )\) |
\(\Big \downarrow \) 3142 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {2 \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {a \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{b \sqrt {a+b \sin (c+d x)}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {2 \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {a \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \sin (c+d x)}{a+b}}}dx}{b \sqrt {a+b \sin (c+d x)}}\right )\) |
\(\Big \downarrow \) 3140 |
\(\displaystyle \frac {\tan (c+d x) \sqrt {a+b \sin (c+d x)}}{d}-\frac {1}{2} b \left (\frac {2 \sqrt {a+b \sin (c+d x)} E\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right )|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \sin (c+d x)}{a+b}}}-\frac {2 a \sqrt {\frac {a+b \sin (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} \left (c+d x-\frac {\pi }{2}\right ),\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \sin (c+d x)}}\right )\) |
-1/2*(b*((2*EllipticE[(c - Pi/2 + d*x)/2, (2*b)/(a + b)]*Sqrt[a + b*Sin[c + d*x]])/(b*d*Sqrt[(a + b*Sin[c + d*x])/(a + b)]) - (2*a*EllipticF[(c - Pi /2 + d*x)/2, (2*b)/(a + b)]*Sqrt[(a + b*Sin[c + d*x])/(a + b)])/(b*d*Sqrt[ a + b*Sin[c + d*x]]))) + (Sqrt[a + b*Sin[c + d*x]]*Tan[c + d*x])/d
3.5.81.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c + d*x])/(a + b)] Int[Sqrt[a/(a + b) + ( b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2 , 0] && !GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ {a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[Sqrt[(a + b*Sin[c + d*x])/(a + b)]/Sqrt[a + b*Sin[c + d*x]] Int[1/Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && !GtQ[a + b, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-(g*Cos[e + f*x])^(p + 1))*(a + b*Sin[e + f*x ])^m*(Sin[e + f*x]/(f*g*(p + 1))), x] + Simp[1/(g^2*(p + 1)) Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 1)*(a*(p + 2) + b*(m + p + 2)*Si n[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && Lt Q[0, m, 1] && LtQ[p, -1] && (IntegersQ[2*m, 2*p] || IntegerQ[m])
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*sin[(e_.) + ( f_.)*(x_)]], x_Symbol] :> Simp[(b*c - a*d)/b Int[1/Sqrt[a + b*Sin[e + f*x ]], x], x] + Simp[d/b Int[Sqrt[a + b*Sin[e + f*x]], x], x] /; FreeQ[{a, b , c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(616\) vs. \(2(205)=410\).
Time = 1.89 (sec) , antiderivative size = 617, normalized size of antiderivative = 4.14
method | result | size |
default | \(-\frac {\sqrt {b \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+a \left (\cos ^{2}\left (d x +c \right )\right )}\, \left (F\left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {-\frac {b \sin \left (d x +c \right )}{a +b}+\frac {b}{a +b}}\, \sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (d x +c \right )}{a -b}-\frac {b}{a -b}}\, a b -F\left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) \sqrt {-\frac {b \sin \left (d x +c \right )}{a +b}+\frac {b}{a +b}}\, \sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (d x +c \right )}{a -b}-\frac {b}{a -b}}\, b^{2}-\sqrt {-\frac {b \sin \left (d x +c \right )}{a +b}+\frac {b}{a +b}}\, \sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (d x +c \right )}{a -b}-\frac {b}{a -b}}\, E\left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) a^{2}+\sqrt {-\frac {b \sin \left (d x +c \right )}{a +b}+\frac {b}{a +b}}\, \sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {b \sin \left (d x +c \right )}{a -b}-\frac {b}{a -b}}\, E\left (\sqrt {\frac {b \sin \left (d x +c \right )}{a -b}+\frac {a}{a -b}}, \sqrt {\frac {a -b}{a +b}}\right ) b^{2}+\left (\cos ^{2}\left (d x +c \right )\right ) b^{2}-\sin \left (d x +c \right ) a b -b^{2}\right )}{b \sqrt {-\left (a +b \sin \left (d x +c \right )\right ) \left (\sin \left (d x +c \right )-1\right ) \left (1+\sin \left (d x +c \right )\right )}\, \cos \left (d x +c \right ) \sqrt {a +b \sin \left (d x +c \right )}\, d}\) | \(617\) |
-1/b*(b*cos(d*x+c)^2*sin(d*x+c)+a*cos(d*x+c)^2)^(1/2)*(EllipticF((b/(a-b)* sin(d*x+c)+a/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*(-b/(a+b)*sin(d*x+c)+b/(a+b ))^(1/2)*(b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2)*(-b/(a-b)*sin(d*x+c)-b/(a-b))^ (1/2)*a*b-EllipticF((b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2),((a-b)/(a+b))^(1/2) )*(-b/(a+b)*sin(d*x+c)+b/(a+b))^(1/2)*(b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2)*( -b/(a-b)*sin(d*x+c)-b/(a-b))^(1/2)*b^2-(-b/(a+b)*sin(d*x+c)+b/(a+b))^(1/2) *(b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2)*(-b/(a-b)*sin(d*x+c)-b/(a-b))^(1/2)*El lipticE((b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2),((a-b)/(a+b))^(1/2))*a^2+(-b/(a +b)*sin(d*x+c)+b/(a+b))^(1/2)*(b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2)*(-b/(a-b) *sin(d*x+c)-b/(a-b))^(1/2)*EllipticE((b/(a-b)*sin(d*x+c)+a/(a-b))^(1/2),(( a-b)/(a+b))^(1/2))*b^2+cos(d*x+c)^2*b^2-sin(d*x+c)*a*b-b^2)/(-(a+b*sin(d*x +c))*(sin(d*x+c)-1)*(1+sin(d*x+c)))^(1/2)/cos(d*x+c)/(a+b*sin(d*x+c))^(1/2 )/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.12 (sec) , antiderivative size = 418, normalized size of antiderivative = 2.81 \[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\frac {2 \, \sqrt {2} a \sqrt {i \, b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right ) + 2 \, \sqrt {2} a \sqrt {-i \, b} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right ) + 3 i \, \sqrt {2} \sqrt {i \, b} b \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 i \, a^{3} - 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) - 2 i \, a}{3 \, b}\right )\right ) - 3 i \, \sqrt {2} \sqrt {-i \, b} b \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (-8 i \, a^{3} + 9 i \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 i \, a}{3 \, b}\right )\right ) + 6 \, \sqrt {b \sin \left (d x + c\right ) + a} b \sin \left (d x + c\right )}{6 \, b d \cos \left (d x + c\right )} \]
1/6*(2*sqrt(2)*a*sqrt(I*b)*cos(d*x + c)*weierstrassPInverse(-4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*I*a^3 - 9*I*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b *sin(d*x + c) - 2*I*a)/b) + 2*sqrt(2)*a*sqrt(-I*b)*cos(d*x + c)*weierstras sPInverse(-4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(-8*I*a^3 + 9*I*a*b^2)/b^3, 1/3* (3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*I*a)/b) + 3*I*sqrt(2)*sqrt(I*b) *b*cos(d*x + c)*weierstrassZeta(-4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*I*a^3 - 9*I*a*b^2)/b^3, weierstrassPInverse(-4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*I* a^3 - 9*I*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b*sin(d*x + c) - 2*I*a)/ b)) - 3*I*sqrt(2)*sqrt(-I*b)*b*cos(d*x + c)*weierstrassZeta(-4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(-8*I*a^3 + 9*I*a*b^2)/b^3, weierstrassPInverse(-4/3*(4* a^2 - 3*b^2)/b^2, -8/27*(-8*I*a^3 + 9*I*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*I*a)/b)) + 6*sqrt(b*sin(d*x + c) + a)*b*sin(d*x + c))/(b*d*cos(d*x + c))
\[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \sqrt {a + b \sin {\left (c + d x \right )}} \sec ^{2}{\left (c + d x \right )}\, dx \]
\[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int { \sqrt {b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \]
\[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int { \sqrt {b \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \]
Timed out. \[ \int \sec ^2(c+d x) \sqrt {a+b \sin (c+d x)} \, dx=\int \frac {\sqrt {a+b\,\sin \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^2} \,d x \]